<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>呼吸灯效果</title>
    <style>
        body {
            font-family: 'Arial', sans-serif;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            height: 100vh;
            margin: 0;
            background-color: #1a1a1a;
        }

        .container {
            text-align: center;
            padding: 20px;
            border-radius: 8px;
            max-width: 500px;
            width: 100%;
        }

        h1 {
            color: white;
            margin-bottom: 30px;
        }

        .light {
            width: 150px;
            height: 150px;
            background-color: #ff4081;
            border-radius: 50%;
            margin: 0 auto 30px;
            animation: breathe 3s ease-in-out infinite;
            box-shadow: 0 0 50px rgba(255, 64, 129, 0.7);
        }

        @keyframes breathe {
            0% {
                opacity: 0.3;
                transform: scale(0.8);
                box-shadow: 0 0 30px rgba(255, 64, 129, 0.5);
            }
            50% {
                opacity: 1;
                transform: scale(1);
                box-shadow: 0 0 70px rgba(255, 64, 129, 0.9);
            }
            100% {
                opacity: 0.3;
                transform: scale(0.8);
                box-shadow: 0 0 30px rgba(255, 64, 129, 0.5);
            }
        }

        .code-section {
            margin-top: 30px;
            text-align: left;
            background-color: rgba(255, 255, 255, 0.1);
            padding: 15px;
            border-radius: 4px;
        }

        pre {
            color: #f0f0f0;
            overflow-x: auto;
        }
    </style>
</head>
<body>
    <div class="container">
        <h1>呼吸灯效果</h1>
        <div class="light"></div>
        <div class="code-section">
            <h3 style="color: white;">CSS代码:</h3>
            <pre><code>.light {
    width: 150px;
    height: 150px;
    background-color: #ff4081;
    border-radius: 50%;
    margin: 0 auto 30px;
    animation: breathe 3s ease-in-out infinite;
    box-shadow: 0 0 50px rgba(255, 64, 129, 0.7);
}

@keyframes breathe {
    0% {
        opacity: 0.3;
        transform: scale(0.8);
        box-shadow: 0 0 30px rgba(255, 64, 129, 0.5);
    }
    50% {
        opacity: 1;
        transform: scale(1);
        box-shadow: 0 0 70px rgba(255, 64, 129, 0.9);
    }
    100% {
        opacity: 0.3;
        transform: scale(0.8);
        box-shadow: 0 0 30px rgba(255, 64, 129, 0.5);
    }
}</code></pre>
        </div>
    </div>
</body>
</html>